home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 January / january_2001.iso / intercd / root / ^4Developers / VB / visbasdb / VBDB / VBDB Code / VB6 Code / Class 5 / QuickExample1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-31  |  1.8 KB  |  59 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   2070
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   3900
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2070
  10.    ScaleWidth      =   3900
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.Data Data1 
  13.       Caption         =   "Data1"
  14.       Connect         =   "Access"
  15.       DatabaseName    =   "c:\VBDB\Working\Biblio.mdb"
  16.       DefaultCursorType=   0  'DefaultCursor
  17.       DefaultType     =   2  'UseODBC
  18.       Exclusive       =   0   'False
  19.       Height          =   345
  20.       Left            =   840
  21.       Options         =   0
  22.       ReadOnly        =   0   'False
  23.       RecordsetType   =   1  'Dynaset
  24.       RecordSource    =   "SELECT * FROM Titles"
  25.       Top             =   1440
  26.       Width           =   2220
  27.    End
  28.    Begin VB.Label Label2 
  29.       Caption         =   "Label2"
  30.       Height          =   495
  31.       Left            =   240
  32.       TabIndex        =   1
  33.       Top             =   600
  34.       Width           =   1215
  35.    End
  36.    Begin VB.Label Label1 
  37.       Caption         =   "Label1"
  38.       DataField       =   "Title"
  39.       DataSource      =   "Data1"
  40.       Height          =   495
  41.       Left            =   240
  42.       TabIndex        =   0
  43.       Top             =   120
  44.       Width           =   3375
  45.    End
  46. Attribute VB_Name = "Form1"
  47. Attribute VB_GlobalNameSpace = False
  48. Attribute VB_Creatable = False
  49. Attribute VB_PredeclaredId = True
  50. Attribute VB_Exposed = False
  51. Option Explicit
  52. Private Sub Form_Activate()
  53. Data1.RecordSource = "SELECT * FROM Titles ORDER BY Title"
  54. Data1.Refresh
  55. Data1.Recordset.MoveLast
  56. Data1.Recordset.MoveFirst
  57. Label2.Caption = Data1.Recordset.RecordCount
  58. End Sub
  59.